#ifndef MYTHR_TRANSLATION_H
#define MYTHR_TRANSLATION_H

#include <QObject>
#include<translation_next.h>

//数据库
#include<QSqlDatabase>
#include<QMessageBox>
#include<QSqlError>
#include<QSqlQuery>
#include<QVariantList>
//翻译+网络
#include<translator.h>
#include <iostream>
#include <QString>
#include <time.h>
#include <QTextCodec>
#include <QDebug>
#include <QObject>
#include <vector>
#include <QMainWindow>
#include <QNetworkReply>
#include<transact.h>
#include<QNetworkAccessManager>
#include<qnetworkrequest.h>
#include <QJsonObject>
#include <QJsonArray>
#include <QJsonDocument>
#include<QNetworkAccessManager>
#include<QTimer>

class mythr_translation : public QObject
{
    Q_OBJECT
public:
    explicit mythr_translation(QObject *parent = nullptr);
    //翻译
        void translation(QString str);
        void cunrushujuku();
        void sql_trans(int id,QString filename);
        int getmaxlinenum(QString filename);
        double totime(QByteArray arrtime);


signals:
        //翻译
            void signal_fanyiover();
            void signal_showproject(QString str,double line);
            void signal_cunrushujuku();
            void signal_trans_next(QString **temp,int biaoshi,int maxline);
private slots:
    //翻译
    void ReplyFinished(QNetworkReply *reply);
    void slot_cunrushujuku();

private:
    //翻译
    int maxline;
    QString **eng;
    int biaoshi_chi;

    QNetworkAccessManager* manager;
    QTimer timer,timer_helpover;


};

#endif // MYTHR_TRANSLATION_H
